package cn.hanna.springcloudalibaba.handler;

import cn.hanna.springcloud.entities.CommonResult;
import com.alibaba.csp.sentinel.slots.block.BlockException;

/**
 * @author smileha
 * @create 2021-10-22 1:28
 * @description
 */
public class BlockExceptionHandler {

    public static CommonResult handleByResource1(BlockException blockException){
        return new CommonResult(444,"根据资源名进行限流：此时流量达到上限，请稍后再试--------------1",null);
    }

    public static CommonResult handleByResource2(BlockException blockException){
        return new CommonResult(444,"根据资源名进行限流：此时流量达到上限，请稍后再试---------------2",null);
    }
}
